﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_DeleteSmallGroupMember')
BEGIN
    PRINT 'Dropping Procedure proc_cm_DeleteSmallGroupMember'
    DROP  Procedure  proc_cm_DeleteSmallGroupMember
END
GO

PRINT 'Creating Procedure proc_cm_DeleteSmallGroupMember'
GO

CREATE PROCEDURE [dbo].[proc_cm_DeleteSmallGroupMember]
	@pSmallGroupId uniqueidentifier,
	@pMemberId int
AS
BEGIN
	SET NOCOUNT ON

	DELETE FROM tbl_member_smallgroup
	WHERE smallgroup_id = @pSmallGroupId and member_id = @pMemberId
END
GO

GRANT EXEC ON dbo.proc_cm_DeleteSmallGroupMember TO PUBLIC
GO
